#include "StdAfx.h"
#include "ConsumerFollowupModel.h"


ConsumerFollowupModel::ConsumerFollowupModel(void)
{
	m_followupIfno = _T("");
	m_followupTm = 0;
}

ConsumerFollowupModel::~ConsumerFollowupModel(void)
{
}

void ConsumerFollowupModel::parseFromJson(Json::Value& jsonData)
{
	if (!jsonData["tm"].isNull()) 
	{
		this->m_followupTm = jsonData["tm"].asInt64();
	}
	CUtils::getJsonStringField(jsonData, "info", m_followupIfno);
}

void ConsumerFollowupModel::toJson(Json::Value& jsonData)
{
	if (this->m_followupIfno.GetLength() > 0) 
	{
		jsonData["info"] = this->m_followupIfno.GetBuffer();
	}
	if (this->m_followupTm > 0) 
	{
		jsonData["tm"] = this->m_followupTm;
	}
}

